import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;

import java.net.URI;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;

/**
 * @author kongwg
 * @create 2021-01-20 21:23
 */
public class JDtest {

    public static void main(String[] args) throws Exception{
        URL url = new URL("https://search.jd.com/Search?keyword=java");

        Document document = Jsoup.parse(url, 3000);

        Elements elements = document.select(".gl-warp li .p-price");

        String price = elements.text();
        System.out.println(price);

    }
}
